<?php

declare (strict_types=1);
namespace cms\office\model;

use Carbon\Carbon;
use Hyperf\Database\Model\Relations\HasOne;

/**
 * @property int $id 
 * @property string $name 名称标识
 * @property int $status 状态,1|正常、2|禁用
 * @property Carbon $created_at 创建时间
 * @property Carbon $updated_at 更新时间
 * @property Carbon $deleted_at 删除时间
 */
class ReceiptModel extends CommonModel
{
    /**
     * @var string
     */
    protected $table = 'office_receipt';

    /**
     * 关联应用
     * @return HasOne
     */
    public function app(): HasOne
    {
        return $this->hasOne(AppModel::class, 'id', 'app_id');
    }

    /**
     * 关联项目
     * @return HasOne
     */
    public function project(): HasOne
    {
        return $this->hasOne(ProjectModel::class, 'id', 'project_id');
    }
}